package com.kaibes.platform.article.util;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.kaibes.platform.article.db.entity.ArticleCategory;
import com.kaibes.platform.article.db.service.ArticleCategoryService;

@Component
public class CategoryUtils {

    @Autowired
    private ArticleCategoryService categoryService;
    
    public List<ArticleCategory> list() {
        return categoryService.list();
    }
    
    public String getName(Integer id) {
        return categoryService.getNameById(id);
    }
    
}
